<template>
  <div class="add-container">
    <div class="add-top">
      <el-page-header @back="goBack" :content="gobacktitle"></el-page-header>
    </div>
    <div class="add-main">
      <div class="add-main-top">
        <el-descriptions
          :title="gobacktitle"
          direction="vertical"
          :column="6"
          border
          id="descriptions"
        >
          <el-descriptions-item label="名称">
            {{ ruleForm.mingcheng }}
          </el-descriptions-item>
          <el-descriptions-item label="唯一编码">
            {{ ruleForm.weiyibm }}
          </el-descriptions-item>
          <el-descriptions-item label="类型">
            {{ ruleForm.leixing }}
          </el-descriptions-item>
          <el-descriptions-item label="单位">
            {{ ruleForm.danwei }}
          </el-descriptions-item>
          <el-descriptions-item label="型别">
            {{ ruleForm.xingbie }}
          </el-descriptions-item>
          <el-descriptions-item label="出厂号码">
            {{ ruleForm.chuchanghm }}
          </el-descriptions-item>
          <el-descriptions-item label="挂载号">
            {{ ruleForm.guazaih }}
          </el-descriptions-item>
          <el-descriptions-item label="归属号">
            {{ ruleForm.guishuh }}
          </el-descriptions-item>
          <el-descriptions-item label="归属机型">
            {{ ruleForm.guishujx }}
          </el-descriptions-item>
          <el-descriptions-item label="规定返修周期">
            {{ ruleForm.guidingfxzq }}
          </el-descriptions-item>
          <el-descriptions-item label="条码">
            {{ ruleForm.tiaoma }}
          </el-descriptions-item>
          <el-descriptions-item label="专业">
            {{ ruleForm.zhuanye }}
          </el-descriptions-item>
          <el-descriptions-item label="编码">
            {{ ruleForm.bianma }}
          </el-descriptions-item>
          <el-descriptions-item label="重要度">
            {{ ruleForm.zhongyaod }}
          </el-descriptions-item>
          <el-descriptions-item label="生产厂家">
            {{ ruleForm.shengchancj }}
          </el-descriptions-item>
          <el-descriptions-item label="出厂日期">
            {{ ruleForm.chuchangrq }}
          </el-descriptions-item>
          <el-descriptions-item label="计时类型">
            {{ ruleForm.jishilx }}
          </el-descriptions-item>
          <el-descriptions-item label="总工作时次">
            {{ ruleForm.zonggongzsc }}
          </el-descriptions-item>
          <el-descriptions-item label="修后工作时次">
            {{ ruleForm.xiuhougzsc }}
          </el-descriptions-item>
          <el-descriptions-item label="删序号">
            {{ ruleForm.cexuh }}
          </el-descriptions-item>
          <el-descriptions-item label="图纸编号">
            {{ ruleForm.tuzhibh }}
          </el-descriptions-item>
          <el-descriptions-item label="批号">
            {{ ruleForm.pihao }}
          </el-descriptions-item>
          <el-descriptions-item label="现处状况">
            {{ ruleForm.xianchuzk }}
          </el-descriptions-item>
          <el-descriptions-item label="状况说明">
            {{ ruleForm.zhuangkuangsm }}
          </el-descriptions-item>
          <el-descriptions-item label="存放位置">
            {{ ruleForm.cunfangwz }}
          </el-descriptions-item>
          <el-descriptions-item label="翻修次数">
            {{ ruleForm.fanxiucs }}
          </el-descriptions-item>
          <el-descriptions-item label="处于超技术状态">
            {{ ruleForm.chuyucjszt }}
          </el-descriptions-item>
          <el-descriptions-item label="安装位置">
            {{ ruleForm.anzhuangwz }}
          </el-descriptions-item>
          <el-descriptions-item label="位置">
            {{ ruleForm.weizhi }}
          </el-descriptions-item>
          <el-descriptions-item label="安装序号">
            {{ ruleForm.anzhuangxh }}
          </el-descriptions-item>
          <el-descriptions-item label="是否启用">
            {{ ruleForm.shifouqy }}
          </el-descriptions-item>
          <el-descriptions-item label="工程号">
            {{ ruleForm.gongchengh }}
          </el-descriptions-item>
          <el-descriptions-item label="章节号">
            {{ ruleForm.zhangjieh }}
          </el-descriptions-item>
          <el-descriptions-item label="挂架状态">
            {{ $util.getguajiazt(ruleForm.guajiazt) }}
          </el-descriptions-item>
          <el-descriptions-item label="创建人">
            {{ ruleForm.createName }}
          </el-descriptions-item>
          <el-descriptions-item label="创建时间">
            {{ ruleForm.createTime }}
          </el-descriptions-item>
          <el-descriptions-item label="备注">
            {{ ruleForm.beizhu }}
          </el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'Page1Deatail',
    props: {
      gobacktitle: {
        type: String,
        default: '详情',
        required: true,
      },
      datarow: {
        type: Object,
        default: function () {
          return {}
        },
      },
    },
    data() {
      return {
        show: true,
        ruleForm: {
          rkdh: '',
          wzmc: '',
          wzqf: '',
          rkzt: '',
          rklx: '',
          rukudmx: [],
        },
        rules: {
          rkdh: [
            { required: true, message: '请输入入库单号', trigger: 'blur' },
          ],
        },
        tabheight: 500,
        centerDialogVisible: false,
      }
    },
    created() {},
    mounted() {
      this.ruleForm = Object.assign({}, this.datarow.row)
    },
    methods: {
      goBack() {
        this.$parent.detailshow = false
      },
      submitForm(formName) {
        this.$refs[formName].validate((valid) => {
          if (valid) {
            alert('submit!')
          } else {
            return false
          }
        })
      },
      resetForm(formName) {
        this.$refs[formName].resetFields()
      },
      selectChange(e) {},
      uploadSuccess() {
        this.importShow = false
      },
    },
  }
</script>
<style lang="scss" scoped>
  .add-container {
    position: fixed;
    left: 0;
    top: 60px;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: #f6f8f9;
    padding: 0 20px 100px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;

    .add-top {
      padding: 10px 0;

      ::v-deep .el-page-header__title {
        font-size: 16px !important;
      }
    }

    .add-main-tital {
      font-size: 18px;
      border-left: 10px solid rgb(121, 189, 255);
      padding-left: 10px;
      margin: 20px 0 20px;

      p {
        margin: 0;
      }
    }

    .add-main {
      flex: 1;
      font-weight: bold;
      display: flex;
      flex-direction: column;

      .add-main-top {
        padding: 0 20px;
        background: #fff;

        ::v-deep {
          .el-descriptions__header {
            border-left: 10px solid #79bdff;
            margin: 20px 0;
          }

          .el-descriptions__title {
            padding-left: 10px;
            font-size: 18px;
          }

          .el-descriptions-item__label {
            font-weight: bold;
            color: #333;
          }
        }
      }

      .add-main-list2 {
        flex: 1;
        background: #fff;
        padding: 0 20px;
        box-sizing: border-box;

        .list-button-group {
          display: flex;
          flex-direction: row;
          padding-bottom: 20px;

          .button-item {
            padding: 0px 10px;
          }

          .button-item:first-child,
          &:last-child {
            padding: 0px 10px 0 0;
          }
        }
      }

      .el-button {
        font-size: 0.14rem !important;
      }

      ::v-deep {
        .elx-table--header-wrapper {
          background-color: rgb(233, 243, 255);
        }

        .elx-table {
          font-size: 0.14rem !important;
        }

        .elx-body--column {
          height: 0.48rem !important;
          line-height: 0.24rem;
        }

        .elx-header--column {
          background-image: none !important;
          height: 0.48rem !important;
        }
      }

      .submit-button {
        margin-top: 20px;
        display: flex;
        justify-content: center;
      }
    }
  }
</style>
